<?php
if (isset($_REQUEST['url'])) {
    $link = $_REQUEST['url'];
    $curlobj = curl_init();
    curl_setopt($curlobj, CURLOPT_POST, 0);
    curl_setopt($curlobj,CURLOPT_URL,$link);
    curl_setopt($curlobj, CURLOPT_RETURNTRANSFER, 1);
    $result=curl_exec($curlobj);
    if($result === false){
        echo curl_error($curlobj);
    }
    curl_close($curlobj);

    //$filename = './images/'.md5($link).'.txt';
    //file_put_contents($filename, $result);
    echo $result;
}else{
?>
<form action='' method='post'>
<input type='text' name='url'>
<input type='submit' value='Go' >
<?php
}
?>